#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec lilu-script.ros -- $0 "$@"
|#

(ql:quickload :lilu-debugger)
(ql:quickload :lilu-emacs)
(ql:quickload :bordeaux-threads)

;;(lilu-roswell:init-debugging)
(defun test01 (d1 d2)
  (setf lilu-debugger:*debugger* d1)
  (lilu-debugger:with-debugger (d2)
    (format *debug-io* "active debugger: ~A~%" lilu-debugger:*debugger*)
    (bt:make-thread #'(lambda ()
                        (format *debug-io* "active debugger: ~A~%" lilu-debugger:*debugger*)
                        (error "myerror1"))))
  (sleep 0.5))

(lilu-debugger:enable-debugger)
;;(lilu-debugger:enable-break)
;;(setf (lilu-debugger:active-break-debugger) :abort)
(test01 :abort :emacs)

(sleep 3)

